<%@ page contentType="text/html; charset=utf-8"%>
<%@ include file="/WEB-INF/jsp/includeTaglib.jsp" %>

<form id="storesSearchForm">
		<div class="globalText" style="padding: 5px;border: solid 1px #999999;margin:5px 5px 5px 55px;width: 490px;" >
			<table class="globalText dbborder" width="100%" border="0" cellpadding="5" cellspacing="5" style="margin: 5px;">
				<tr>
					<td>门店编号</td>
					<td>
						<input style="width: 100px;" class="txtbox globalText" type="text" name="storeCode" />
					</td>
					<td>门店名称</td>
					<td>
						<input style="width: 80px;" class="txtbox globalText" type="text" name="storeName" />
					</td>
					<td>是否分配</td>
					<td>
						<select name="hasAssigned" class="globalText">
							<option></option>
							<option value="1">已分配</option>
							<option value="0">未分配</option>
						</select>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<input type="button" class="btnStyle" value="查询" onclick="searchStore();"/>
					</td>
				</tr>
			</table>
		</div>
		<input type="hidden" name="projectId" value="${projectId}" />
		<input type="hidden" name="empId" value="${empId}" />
</form>

<div id="storesDiv">
	
</div>

<script>
	$(document).ready(function(){
		$('#storesDiv').load("<c:url value ='/project/employeeAssignedStoresData.html'/>?projectId="+${projectId}+"&empId="+${empId});
	});
	
	function searchStore(){
		$("#storesDiv").html("loading...");
		
		$.post("<c:url value ='/project/employeeAssignedStoresData.html'/>",
				  $('#storesSearchForm').serialize(),
				  function(data){
						$("#storesDiv").html(data);
				  });
	}
</script>